/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.breeze.service;

import com.breeze.dao.BillDao;
import com.breeze.dao.CategoryDao;
import com.breeze.dao.UserDao;
import com.breeze.dao.UserbillDao;
import com.breeze.entity.Tbill;
import com.breeze.entity.Tcategory;
import com.breeze.entity.Tuser;
import com.breeze.entity.Tuserbill;
import java.util.List;

/**
 *
 * @author huateng
 */
public class CoreServiceImpl implements ICoreService{
    
    private BillDao billDao;
    private UserDao userDao;
    private UserbillDao userbillDao;
    private CategoryDao categoryDao;

    /**
     * @param billDao the billDao to set
     */
    public void setBillDao(BillDao billDao) {
        this.billDao = billDao;
    }

    /**
     * @param userDao the userDao to set
     */
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    /**
     * @param userbillDao the userbillDao to set
     */
    public void setUserbillDao(UserbillDao userbillDao) {
        this.userbillDao = userbillDao;
    }

    /**
     * @param categoryDao the categoryDao to set
     */
    public void setCategoryDao(CategoryDao categoryDao) {
        this.categoryDao = categoryDao;
    }

    public Tuser insertUser(Tuser user) {
        return userDao.inserTuser(user);
    }

    public long queryUserCount(Tuser user) {
        return userDao.queryCount(user);
    }

    public List queryUserList(Tuser user) {
        return userDao.queryForuserList(user);
    }

    public int deleteUser(Tuser user) {
        return userDao.deleteuser(user);
    }

    public Tcategory insertCategory(Tcategory category) {
        return categoryDao.inserTcategory(category);
    }

    public long queryCategoryCount(Tcategory category) {
        return categoryDao.queryCount(category);
    }

    public List queryCategoryList(Tcategory category) {
        return categoryDao.queryForcategoryList(category);
    }

    public int deleteCategory(Tcategory category) {
        return categoryDao.deletecategory(category);
    }

    public Object insertBill(Tbill bill) {
        return billDao.insertBill(bill);
    }

    public long queryBillCount(Tbill bill) {
        return billDao.queryCount(bill);
    }

    public List queryBillList(Tbill bill) {
        return billDao.queryForBillList(bill);
    }

    public int deleteBill(Tbill bill) {
        return billDao.deleteBill(bill);
    }

    public Tuserbill insertUserbill(Tuserbill userbill) {
        return userbillDao.inserTuserbill(userbill);
    }

    public long queryUserbillCount(Tuserbill userbill) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List queryUserbillList(Tuserbill userbill) {
        return userbillDao.queryForuserbillList(userbill);
    }

    public int deleteUserbill(Tuserbill userbill) {
        return userbillDao.deleteUserbill(userbill);
    }

    public int updateBill(Tbill bill) {
        return billDao.updateBill(bill);
    }
    
    
}
